package com.feng.mybatis.service;

import com.feng.mybatis.bean.Book;
import com.feng.mybatis.mapper.BookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookService {
    @Autowired
    BookMapper bookMapper;

    public Book getBookById(Integer id){
        Book bookById = bookMapper.getBookById(id);
        return bookById;
    }

    public Integer getCount(){
        Integer count = bookMapper.getCount();
        return count;
    }
}
